#include<stdio.h>
#include<string.h>
int main(int argc,char*argv[])
{
  if(argc!=2)
  {
    printf("argv error!\n");
    return 1;
  }
  FILE*fp=fopen("argv[1]","r");
  if(!fp)
  {
    perror("fopen fail");
    return 2;
  }
  char buf[1024];
  memset(buf,0,sizeof(buf));
  while(1)
  {
    int s=fread(buf,sizeof(buf),1,fp);
    if(s>0)
    {
      printf("%s",buf);
    }
    if(feof(fp))
    {
      break;
    }
  }
  fclose(fp);
  return 0;
}
